import { configureStore } from '@reduxjs/toolkit';
// import thunkMiddleware from 'redux-thunk';

import tabbarReducer from './features/tabbarSlice';
import cinemaReducer from './features/cinemaSlice';
import cityReducer from './features/citySlice';

const store = configureStore({
  reducer: { tabbar: tabbarReducer, cinema: cinemaReducer, city: cityReducer },
  // middleware: (getDefaultMiddleware) =>
  //   getDefaultMiddleware().concat(thunkMiddleware),
  devTools: true,
});

export default store;

export type RootState = ReturnType<typeof store.getState>;

export type AppDispatch = typeof store.dispatch;
